package com.ssmtest.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ssmtest.dao.TestDao;
import com.ssmtest.pojo.TestPojo;

@Controller
@RequestMapping("hello/")
public class HelloWorld {
	@Autowired
	private TestDao testDao;
	@RequestMapping("helloworld/{id}")
	@ResponseBody
	public TestPojo getById(@PathVariable("id") Integer id){
		
		//return new TestPojo("helloworld",25,id);
		return testDao.getTestPojo();
	}
}
